<?php
class helper_date extends system_view_helper_abstract {
	
	public function date($date = null, $format = null) {
		if($date === null) {
			$date = new system_date();
		}
		if(!is_object($date)) {
			$date = new system_date($date);
		}
		if($format === null) $format = 'Y/m/d H:i:s';
		return $date->setTimezone('PRC')->toString($format);
	}

}